﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Ring2Park.Models;

namespace Ring2Park.Controllers
{
    public class HomeController : Controller
    {
        [AllowAnonymous]
        public ActionResult Index()
        {
            if (User.Identity.IsAuthenticated) { 
                var profile = Profile.GetProfile(User.Identity.Name); 
                ViewBag.Message = "Welcome back " + profile.FirstName + " " + profile.LastName + "!"; 
            } 
            else 
            { 
                ViewBag.Message = "Welcome to Ring2Park Online."; 
            } 

            return View();
        }

        [AllowAnonymous]
        public ActionResult About()
        {
            return View();
        }
    }
}
